#include"server.hpp"
#include<memory>

static void Usage(string proc)
{
    cout<<"\nUsage:\n\t"<<proc<<" local_port\n\t";
}

int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }
    uint16_t port = atoi(argv[1]);
    unique_ptr<server> ser(new server(port));
    ser->initServer();

    ser->start();

    return 0;
}